﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AirManager.Entities;
using FluentNHibernate.Mapping;

namespace AirManager.Repository
{
    public class FixMap : ClassMap<Fix>
    {
        public FixMap()
        {
            Not.LazyLoad();
            Id(x => x.Id).Column("FixID").GeneratedBy.Identity();
            Map(x => x.Descricao).Column("Descricao").Length(500);
            Map(x => x.DataRevisao).Column("dataregistro");
            References(x => x.Fleet).Not.Nullable().Column("FleetID").Cascade.All().Cascade.Delete();
            
        }
       
    
    }
}
